package com.hbue.springboot.pojo.DTO;

import com.hbue.springboot.pojo.TbAccount;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.beans.Transient;
import java.sql.Date;

/**
 * 功能：
 * 日期：2025/1/12 16:28
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TbAccountDTO {
    private Integer id;
    private String userName;
    private String userEmail;
    private String userMobile;
    private Integer userRole;
    private Date gmtCreate;
    private Date gmtModified;

    private String userPwd;

    private String oldPwd;

    private String token;

    public String getOldPwd() {
        return oldPwd;
    }

    public void setOldPwd(String oldPwd) {
        this.oldPwd = oldPwd;
    }

    public TbAccountDTO(TbAccount tbAccount) {
        this.id = tbAccount.getId();
        this.userName = tbAccount.getUserName();
        this.userEmail = tbAccount.getUserEmail();
        this.userMobile = tbAccount.getUserMobile();
        this.userRole = tbAccount.getUserRole();
        this.gmtCreate = tbAccount.getGmtCreate();
        this.gmtModified = tbAccount.getGmtModified();
        this.userPwd = tbAccount.getUserPwd();
        this.oldPwd = tbAccount.getUserPwd();
    }
}
